diff --git a/plugin/VideoLogoOverlay/VideoLogoOverlay.php b/plugin/VideoLogoOverlay/VideoLogoOverlay.php index e432ddc41..35137e84f 100644 --- a/plugin/VideoLogoOverlay/VideoLogoOverlay.php +++ b/plugin/VideoLogoOverlay/VideoLogoOverlay.php @@ -1,113 +1,113 @@ url = ""; $o = new stdClass(); $o->type = array('center' => 'Center', 'top' => 'Top', 'bottom' => 'Bottom', 'top left' => 'Top Left', 'bottom left' => 'Bottom Left', 'top right' => 'Top Right', 'bottom right' => 'Bottom Right'); $o->value = 'top right'; $obj->position = $o; $obj->opacity = 50; $obj->useUserChannelImageAsLogo = true; return $obj; } public function getPluginVersion() { return "2.0"; } public function getPluginMenu() { global $global; $filename = $global['systemRootPath'] . 'plugin/VideoLogoOverlay/pluginMenu.html'; return file_get_contents($filename); } static function getStyle() { $obj = AVideoPlugin::getObjectData("VideoLogoOverlay"); "position: absolute; top: 0; left: 0; opacity: 0.5; filter: alpha(opacity=50);"; $opacity = "opacity: " . ($obj->opacity / 100) . "; filter: alpha(opacity={$obj->opacity});pointer-events:none; "; $position = "position: absolute; top: 0; left: 0; "; switch ($obj->position->value) { case "center": $position = "position: absolute; top: 50%; left: 50%; margin-left: -125px; margin-top: -35px; "; break; case "top": $position = "position: absolute; top: 0; left: 50%; margin-left: -125px; "; break; case "bottom": $position = "position: absolute; bottom: 0; left: 50%; margin-left: -125px; "; break; case "top left": $position = "position: absolute; top: 0; left: 0; "; break; case "bottom left": $position = "position: absolute; bottom: 0; left: 0; "; break; case "top right": $position = "position: absolute; top: 0; right: 0; "; break; case "bottom right": $position = "position: absolute; bottom: 0; right: 0; "; break; } return $position . $opacity; } static function getLink() { $obj = AVideoPlugin::getObjectData("VideoLogoOverlay"); if (!empty($obj->url)) { $url = $obj->url; } else { $url = "#"; } return $url; } function getFooterCode() { global $global; if(!isVideo()){ return ''; } $videos_id = getVideos_id(); $video = Video::getVideoLight($videos_id); $style = VideoLogoOverlay::getStyle(); $url = VideoLogoOverlay::getLink(); $obj = AVideoPlugin::getObjectData("VideoLogoOverlay"); $logoOverlay = "{$global['webSiteRootURL']}videos/logoOverlay.png"; $cols = "col-lg-12 col-md-8 col-sm-7 col-xs-6"; if ($obj->useUserChannelImageAsLogo) { $logoOverlay = User::getPhoto($video['users_id']); $cols = "col-lg-12 col-md-8 col-sm-7 col-xs-6"; } - $html = '
Logo
'; + $html = '
Logo
'; $js = "$('{$html}').appendTo('#mainVideo');"; PlayerSkins::addOnPlayerReady($js); } }